<<<<<<< HEAD
<template>
    <div id="addAccount">
        <table>
            <tr>
                <td>名称:</td>
                <td><el-input v-model="clearName"></el-input></td>
            </tr>
            <br>
            <tr>
                <td></td>
                <td><el-button style="margin-left: 170px" type="primary" @click="insert()">新增</el-button></td>
            </tr>
        </table>
    </div>
</template>
<script>

export default {
    name: 'AddEmployee',
    data() {
        return {

            clearName: ""

        }
    },
    methods: {
        insert: function () {

            if (this.clearName === "") {
                alert("名称不能为空")
                return
            }
            this.axios({
                url: "/info/clear/insert",
                params: {
                    clearName: this.clearName,
                }
            }).then(rs => {
                console.log(rs)
                if (rs.data.code === 200) {
                    alert("新增成功")
                } else {
                    alert("类别已存在")
                }

            })
        },
    }
}
</script>

<style scoped>
#addAccount {
    width: 100%;
    height: 200px;
    /* overflow: scroll; */
    /* background-color: pink; */
}

#contact {
    width: 90%;
    margin: auto;
    border-collapse: collapse;
    color: #707276;
}

#contact th,
#contact td {
    border: 1px #c0c4cc solid;
    height: 35px;
    min-width: 30px;
}

p {
    color: #4b4a4a;
    font-size: 18px;

}

.el-input {
    width: 240px;
}

table td :not([id=contact]) {
    text-align: left;
    padding-right: 10px;
    /* padding-top: 10px;
    padding-bottom: 10px; */
}

td:nth-child(odd) {
    text-align: center;
    padding-right: 10px;
}
=======
<template>
    <div id="addAccount">
        <table>
            <tr>
                <td>名称:</td>
                <td><el-input v-model="clearName"></el-input></td>
            </tr>
            <br>
            <tr>
                <td></td>
                <td><el-button style="margin-left: 170px" type="primary" @click="insert()">新增</el-button></td>
            </tr>
        </table>
    </div>
</template>
<script>

export default {
    name: 'AddEmployee',
    data() {
        return {

            clearName: ""

        }
    },
    methods: {
        insert: function () {

            if (this.clearName === "") {
                alert("名称不能为空")
                return
            }
            this.axios({
                url: "/info/clear/insert",
                params: {
                    clearName: this.clearName,
                }
            }).then(rs => {
                console.log(rs)
                if (rs.data.code === 200) {
                    alert("新增成功")
                } else {
                    alert("类别已存在")
                }

            })
        },
    }
}
</script>

<style scoped>
#addAccount {
    width: 100%;
    height: 200px;
    /* overflow: scroll; */
    /* background-color: pink; */
}

#contact {
    width: 90%;
    margin: auto;
    border-collapse: collapse;
    color: #707276;
}

#contact th,
#contact td {
    border: 1px #c0c4cc solid;
    height: 35px;
    min-width: 30px;
}

p {
    color: #4b4a4a;
    font-size: 18px;

}

.el-input {
    width: 240px;
}

table td :not([id=contact]) {
    text-align: left;
    padding-right: 10px;
    /* padding-top: 10px;
    padding-bottom: 10px; */
}

td:nth-child(odd) {
    text-align: center;
    padding-right: 10px;
}
>>>>>>> 6be95d2b3200ab6fbb17d1e0a5a9b367f780cc8e
</style>